package Vue.Principale;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.GridLayout;

import javax.swing.BorderFactory;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JPanel;

import Modele.Carte;
import Modele.Joueur;

public class MenuCarte extends JPanel {

	private static final long serialVersionUID = 1L;
	private JPanel contenu;
	private MiniMap miniMap;
	private Action action;
	private InfosHero info;
	
	public MenuCarte(Carte c, Joueur[] joueurs) {
		this.setLayout(null);
		this.setBackground(new Color(69, 53, 40));
		
		miniMap = new MiniMap(c, joueurs);
		miniMap.setBounds(0, 0, 272, 245);
		action = new Action();
		action.setBounds(0, 245, 272, 300);
		info = new InfosHero();
		info.setBounds(0, 545, 272, 455);
		
		this.add(miniMap);
		this.add(action);
		this.add(info);
		
		
		/*
		contenu.add(miniMap, BorderLayout.NORTH);
		contenu.add(action, BorderLayout.CENTER);
		contenu.add(info, BorderLayout.SOUTH);
		
		this.add(contenu);
		
		JPanel joueur = new JPanel();
		joueur.setSize(190, 300);
		joueur.setPreferredSize(new Dimension(190, 300));
		joueur.setBackground(Color.PINK);
		joueur.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));
		
		JPanel chateau = new JPanel();
		chateau.setBackground(Color.RED);
		chateau.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));
			
		JPanel hero = new JPanel();
		hero.setBackground(Color.CYAN);
		hero.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));
			
		joueur.setLayout(new GridLayout(1, 2));
		joueur.add(chateau);
		joueur.add(hero);		
		
		
		InfosHero infos = new InfosHero();
		
		this.setLayout(new GridBagLayout());
		GridBagConstraints gbc = new GridBagConstraints();
		gbc.gridx = gbc.gridy = 0;
		gbc.gridwidth = GridBagConstraints.REMAINDER; 
		gbc.gridheight = 1;
		this.add(miniMap, gbc);
		
		gbc.gridx = 0;
		gbc.gridy = 1;
		gbc.weightx = 1.;
		gbc.weighty = 1.;
		gbc.fill = GridBagConstraints.BOTH;
		this.add(joueur, gbc);
		
		gbc.gridx = 0;
		gbc.gridy = 2;
		gbc.weightx = 1.;
		gbc.weighty = 1.;
		gbc.fill = GridBagConstraints.BOTH;
		this.add(actions, gbc);
		
		gbc.gridx = 0;
		gbc.gridy = 3;
		gbc.weightx = 1.;
		gbc.weighty = 0.;
		gbc.fill = GridBagConstraints.BOTH;
		this.add(infos, gbc);
		*/
	}

	public MiniMap getMiniMap() {
		return miniMap;
	}

	public InfosHero getInfo() {
		return info;
	}

	public Action getAction() {
		return action;
	}
	
	
	
	
}